package com.landscope.issue.service.applet;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import com.landscope.issue.bean.E_PERMISSION_TYPE;
import com.landscope.issue.controller.api.dto.ProjectListDto;
import com.landscope.issue.controller.base.ResponseResult;
import com.landscope.issue.controller.wx.dto.AppletProjectItem;
import com.landscope.issue.controller.wx.dto.AppletProjectListDto;
import com.landscope.issue.controller.wx.dto.AppletReportListDto;
import com.landscope.issue.controller.wx.param.AppletReportListParam;
import com.landscope.issue.entity.Project;
import com.landscope.issue.mapper.ProjectMapper;
import com.landscope.issue.utils.TokenUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.FileTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;

@Service
@Slf4j
public class ApiAppletProjectService {

    @Resource
    private ProjectMapper projectMapper;

    public ResponseResult<AppletProjectListDto> list() {
        List<AppletProjectItem> list = projectMapper.findAll();
        AppletProjectListDto dto = new AppletProjectListDto();
        dto.setList(list);
        return new ResponseResult().success().setData(dto);
    }
}
